<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>

<style>
#target1 {
	padding-left: 100px;
	padding-bottom: 100px;
	color:green;
	background-color: green;
	opacity: invalid value;
	border: black solid 5px;
	border-left: thick dashed lightgreen;
	border-inline-end-color: pink;
}
#target2 {
  -webkit-align-content: space-between;
  transform: translate(100px);
}
</style>

<div id="target1"></div>
<div id="target2"></div>

<script>
test(function() {
	assert_true(internals.isCSSPropertyUseCounted(document, "color"));
	assert_true(internals.isCSSPropertyUseCounted(document, "background-color"));
	assert_true(internals.isCSSPropertyUseCounted(document, "padding-bottom"));
	assert_true(internals.isCSSPropertyUseCounted(document, "padding-left"));
	assert_true(internals.isCSSPropertyUseCounted(document, "border-inline-end-color"));
}, "Test setting and reading css properties");

test(function() {
	assert_true(internals.isCSSPropertyUseCounted(document, "border"))
	assert_false(internals.isCSSPropertyUseCounted(document, "border-color"));
	assert_false(internals.isCSSPropertyUseCounted(document, "border-style"));
	assert_false(internals.isCSSPropertyUseCounted(document, "border-width"));

	assert_true(internals.isCSSPropertyUseCounted(document, "border-left"))
	assert_false(internals.isCSSPropertyUseCounted(document, "border-left-color"));
	assert_false(internals.isCSSPropertyUseCounted(document, "border-left-style"));
	assert_false(internals.isCSSPropertyUseCounted(document, "border-left-width"));

}, "Test setting a shorthand and reading longhand");

test(function() {
	assert_false(internals.isCSSPropertyUseCounted(document, "opacity"));
}, "Test that properties with invalid values aren't counted");

test(function() {
	assert_false(internals.isCSSPropertyUseCounted(document, "box-sizing"));
}, "Test that properties specified in UA stylesheet aren't counted");

test(function() {
  assert_false(internals.isCSSPropertyUseCounted(document, "align-content"));
  assert_true(internals.isCSSPropertyUseCounted(document, "-webkit-align-content"));
  assert_false(internals.isCSSPropertyUseCounted(document, "-webkit-transform"));
  assert_true(internals.isCSSPropertyUseCounted(document, "transform"));
}, "Test properties with aliases");


</script>